<?php

namespace App\Services;


use App\Models\Category;

class CategoryService extends BaseService
{
    /**
     * @Notes 获取轮播图
     * @return array
     * @author ypp
     * @date 2021/3/5
     * @time 9:42
     */
    public function getList(): array
    {
        $list = Category::where(['is_show'=>1,'status'=>1])
            ->orderBy('create_time', 'asc')->get();
        return $list ? $this->format($list) : $this->format_error('暂无数据');

    }
}
